﻿@model equinoxWeb.Models.Cliente
@{
    ViewBag.Title = "Registro Cliente";
    Layout = (ViewBag.esCliente!=null && ViewBag.esCliente?"~/Views/Shared/_ClienteLayout.cshtml":"~/Views/Shared/_Layout.cshtml");
}
<script type='text/javascript' src="/Scripts/cliente.js"></script>

<!-- content -->
    <form class="form-horizontal" name="createForm" method="post">
        <fieldset>
            <legend>Registrar cliente</legend>
            <div class="form-group">
                <label class="col-md-4 col-sm-6 control-label" for="CodigoCliente">Codigo del cliente*:</label>
                <div class="col-md-3 col-sm-6">
                    @Html.TextBoxFor(model => model.CodigoCliente, new { @class="form-control",  maxlength = "35", id = "CodigoCliente" })
                </div>
            </div>
            
            <div class="form-group">
                <label class="col-md-4 col-sm-6 control-label" for="NombreReferencia">Nombre login:</label>
                <div class="col-md-3 col-sm-6">
                    @Html.TextBoxFor(model => model.NombreReferencia, new { @class="form-control",  maxlength = "10", id = "NombreReferencia" })
                </div>
            </div>

            <div class="form-group">
                <label class="col-md-4 col-sm-6 control-label" for="RazonSocial">Razon social*:</label>
                <div class="col-md-3 col-sm-6">
                    @Html.TextBoxFor(model => model.RazonSocial, new { @class="form-control",  maxlength = "30", id = "RazonSocial", @Value = "" })
                </div>
            </div>

            <!--RUC-->
            <div class="form-group">
                <label class="col-md-4 col-sm-6 control-label" for="Ruc">Ruc:</label>
                <div class="col-md-3 col-sm-6">
                    @Html.TextBoxFor(model => model.Ruc, new { @class="form-control", id = "Ruc" })
                </div>
            </div>
            
            <div class="form-group">
                <label class="col-md-4 col-sm-6 control-label" for="Direccion">Direccion:</label>
                <div class="col-md-3 col-sm-6">
                    @Html.TextBoxFor(model => model.Direccion, new { @class="form-control", id="Direccion"})
                    @Html.ValidationMessageFor(model => model.Direccion, null)
                </div>
            </div>

            <div class="form-group">
                <label class="col-md-4 col-sm-6 control-label" for="TelefonoCorp">Telefono corporativo:</label>
                <div class="col-md-3 col-sm-6">
                    @Html.TextBoxFor(model => model.TelefonoCorp, new { @class="form-control",  maxlength = "30", id = "TelefonoCorp" })
                </div>
            </div>

            <div class="form-group">
                <label class="col-md-4 col-sm-6 control-label" for="CorreoCorp">Correo corporativo:</label>
                <div class="col-md-3 col-sm-6">
                    @Html.TextBoxFor(model => model.CorreoCorp, new { @class="form-control",id="CorreoCorp", placeholder = "ejemplo@dominio.com" })
                </div>
            </div>

            <div class="form-group">
                <label class="col-md-4 col-sm-6 control-label" for="NombreContacto">Nombre Contacto:</label>
                <div class="col-md-3 col-sm-6">
                    @Html.TextBoxFor(model => model.NombreContacto, new { @class="form-control",  maxlength = "30", id = "NombreContacto" })
                </div>
            </div>

            <div class="form-group">
                <label class="col-md-4 col-sm-6 control-label" for="TelefonoContacto">Telefono de Contacto:</label>
                <div class="col-md-3 col-sm-6">
                    @Html.TextBoxFor(model => model.TelefonoContacto, new { @class="form-control", id="TelefonoContacto",maxlength = "9", minlength = "9" })
                </div>
            </div>

            <div class="form-group">
                <label class="col-md-4 col-sm-6 control-label" for="CorreoContacto">Correo del contacto*:</label>
                <div class="col-md-3 col-sm-6">
                    @Html.TextBoxFor(model => model.CorreoContacto, new { @class="form-control", placeholder = "ejemplo@dominio.com"  })
                </div>
            </div>
			<br/>
			<div class="form-group">
				<div class="col-md-3 col-sm-6">
					<button type="button" class="btn btn-large btn-primary" onclick="javascript:AgregarCliente(document.createForm);">Registrar</button>&nbsp;

					<button type="button" class="btn btn-large" onclick="javascript:history.back()">Atras</button>
				</div>
			</div>
                

        </fieldset>
    </form>
    <!-- / content -->
